Skip to main content

Mouse Drag

AutomatR.Windows.Activities.MouseDrag

The "Mouse Drag" activity in AutomatR is designed for Windows UI Automation. It allows you to simulate dragging the mouse cursor to a specified region on the screen, providing precise control in automation workflows.

Properties

NameDescription
Input
Region SelectionThe region to be dragged. Specify a System.Drawing.Rectangle representing the area to drag the mouse cursor.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelayEnter the wait time in seconds (Example: 5 seconds i.e., 5) to start the activity. Integer variables containing the delay duration.

How to use:

  1. Drag and drop the "Mouse Drag" activity onto the workflow.
  2. Configure the properties by specifying the region to be dragged using the "Region Selection" property.
  3. Optionally, configure the delay and customize the display name.
  4. Execute the workflow to simulate dragging the mouse cursor to the specified region.

Example: Consider an example where the "Mouse Drag" activity is used to drag the mouse cursor to a specific region on the screen.

Mouse Drag:
Region Selection: new Rectangle(100, 100, 200, 200)
Result: isDragSuccessful

In this example, the activity simulates dragging the mouse cursor to the region defined by the rectangle (x=100, y=100, width=200, height=200). The result of the operation (success or failure) is stored in the Boolean variable "isDragSuccessful" for further handling in the workflow.